/*
package com.liyghting.mutildb.bdb.controller;

import com.liyghting.mutildb.bdb.order.mapper.BTOrderItemMapper;
import com.liyghting.mutildb.bdb.order.mapper.BTOrderMapper;
import com.liyghting.mutildb.bdb.order.model.BTOrder;
import com.liyghting.mutildb.bdb.order.model.BTOrderItem;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

*/
/**
 * @author LiYiGuang
 * @date 2018/10/23 16:24
 *//*

@Slf4j
@RestController
@RequestMapping("/bdb")
public class BdbController {

	@Autowired
	private BTOrderMapper orderMapper;

	@Autowired
	private BTOrderItemMapper orderItemMapper;

	@GetMapping("/insert")
	@Transactional("bdbTransactionManager")
	public void insert(HttpServletRequest request) {
		log.info("request {}", request);
		BTOrder order = new BTOrder();
		order.setStatus("B 完成");
		order.setUserId(1);

		int i = orderMapper.insert(order);

		BTOrderItem orderItem = new BTOrderItem();
		orderItem.setOrderId(order.getOrderId());
		orderItem.setStatus("B 完成");
		orderItem.setUserId(1);
		i = orderItemMapper.insert(orderItem);

	}
}
*/
